package com.jia.springcloud.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 1038940655
 * @create 2021/1/16 11:18
 */
@RestController
public class ConfigClientController {

    @Value("${spring.application.name}")
    private String applicationName;//获取git上面的微服务配置的名称

    @Value("${eureka.client.service-url.defaultZone}")
    private String eurekaServer;//获取git上面的微服务的eureka服务

    @Value("${server.port}")
    private String port;//获取git上面的微服务的端口号


    @RequestMapping("/config")
    public String getConfig(){
        return "applicationName:"+applicationName +
                "eurekaServer:"+eurekaServer +
                "port:"+port;
    }
}
